home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / serial / mdm-2.000 / mdm-2 / modem.h < prev    next >
C/C++ Source or Header  |  1993-11-16  |  4KB  |  145 lines

  1. /*************************************************************************
  2. Linux MODEM Server version 2
  3. --------------------------------------------------------------------------
  4.  
  5.     Copyright (C) 1992  Anthony Rumble
  6.  
  7.     This program is free software; you can redistribute it and/or modify
  8.     it under the terms of the GNU General Public License as published by
  9.     the Free Software Foundation; either version 1, or
  10.     any later version.
  11.  
  12.     This program is distributed in the hope that it will be useful,
  13.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.     GNU General Public License for more details. <copying>
  16.  
  17.     You should have received a copy of the GNU General Public License
  18.     along with this program; if not, write to the Free Software
  19.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  
  21. --------------------------------------------------------------------------
  22. RCS Info
  23.  
  24. $Header: /home/smilie/bbs/modem/RCS/modem.h,v 1.16 1993/11/17 00:12:42 smilie Exp $
  25.  
  26. $Log: modem.h,v $
  27.  * Revision 1.16  1993/11/17  00:12:42  smilie
  28.  * rolled to beta2
  29.  *
  30.  * Revision 1.15  1993/11/16  11:54:55  smilie
  31.  * rolled version
  32.  *
  33.  * Revision 1.14  1993/11/16  11:42:04  smilie
  34.  * added initspeed for Initialisation speed
  35.  *
  36.  * Revision 1.13  1993/10/10  06:33:27  smilie
  37.  * fixed a few dependancys
  38.  *
  39.  * Revision 1.12  1993/10/10  06:24:39  smilie
  40.  * added new config entries
  41.  *
  42.  * Revision 1.11  1993/09/05  05:06:00  smilie
  43.  * added SCOisms
  44.  *
  45.  * Revision 1.10  1993/05/10  13:28:45  smilie
  46.  * rolled revision
  47.  *
  48.  * Revision 1.9  1993/05/10  13:27:35  smilie
  49.  * added WTMP entry
  50.  *
  51.  * Revision 1.8  1993/03/28  04:53:17  smilie
  52.  * updated version
  53.  *
  54.  * Revision 1.6  1992/10/11  08:49:18  smilie
  55.  * added CONFIG.carrier for carrier detection
  56.  *
  57.  * Revision 1.5  1992/10/10  06:10:21  smilie
  58.  * updated version to 2.02a
  59.  *
  60.  * Revision 1.4  1992/10/10  04:49:06  smilie
  61.  * added server version number
  62.  *
  63.  * Revision 1.2  1992/10/09  13:44:22  smilie
  64.  * fixed some bugs
  65.  *
  66.  * Revision 1.1  1992/10/09  13:19:08  smilie
  67.  * Initial revision
  68.  *
  69.  
  70. $Id: modem.h,v 1.16 1993/11/17 00:12:42 smilie Exp $
  71.  
  72. *************************************************************************/
  73. #ifndef _MODEM_H
  74. #define _MODEM_H
  75.  
  76. #include <stdio.h>
  77. #include <sys/types.h>
  78. #ifdef linux
  79. #include <paths.h>
  80. #endif
  81. #include <utmp.h>
  82.  
  83. #define MDMSERVER_VERSION    "2.09beta2"
  84.  
  85. #ifndef _PATH_WTMP
  86. #define _PATH_WTMP    "/etc/wtmp"
  87. #endif
  88.  
  89. /* fgetsraw.c */
  90. extern int fgetsraw(char *, int, FILE *, int);
  91.  
  92. /* fgetstr.c */
  93. extern char *fgetstr(char *, int, FILE *);
  94.  
  95. /* flog.c */
  96. extern void     flog (const char *, ...);
  97.  
  98. /* strupr.c */
  99. extern char *strupr(char *);
  100.  
  101. /* setup.c */
  102. extern int load_config(void);
  103.  
  104. typedef struct
  105.     {
  106.     int locked;            /* Locked DTE rate */
  107.     long speed;            /* Modem Speed */
  108.     long initspeed;            /* INIT speed */
  109.     int conspeed;            /* Connected SPEED */
  110.     char init[1024];        /* Initialise String */
  111.     int quiet;            /* If you want QUIET time */
  112.     char quiet_str_on[256];        /* QUIET Modem String */
  113.     char quiet_str_off[256];    /* QUIET Modem String */
  114.     int quiet_start;        /* QUIET start hour */
  115.     int quiet_stop;            /* QUIET stop hour */
  116.     cc_t timeout;            /* Wait for CR timeout seconds */
  117.                     /* Set this depending on if you have MNP or not */
  118.     cc_t timeout_connect;        /* Time to wait for CONNECT string */
  119.     int error_correcting;        /* Error correcting modem */
  120.     int issue;            /* Send issue */
  121.     int rows;        /* Rows */
  122.     int cols;        /* Cols */
  123.      } config_struct;
  124.  
  125. extern config_struct CONFIG;
  126.  
  127. extern char stty[8];
  128.  
  129. /* Modem Return codes */
  130. #define MDM_UNKNOWN    0
  131. #define MDM_NOCARRIER    1
  132. #define MDM_NOANSWER    2
  133. #define MDM_BUSY    3
  134. #define MDM_VOICE    4
  135. #define MDM_NODIALTONE    5
  136. #define MDM_CONNECT    6
  137.  
  138. #ifndef TRUE
  139. #define TRUE    1
  140. #define FALSE    0
  141. #endif
  142.  
  143. #endif
  144.  
  145.